﻿namespace BingleMaps.Controls
{
    public class PerformanceProgressBar : Microsoft.Phone.Controls.PerformanceProgressBar
    {
        private uint _busyCount;
        new public bool IsIndeterminate
        {
            get { return base.IsIndeterminate; }
            set
            {
                _busyCount = value ? _busyCount + 1 : _busyCount > 0 ? _busyCount - 1 : 0;
                base.IsIndeterminate = _busyCount > 0;
            }
        }
    }
}
